package com.example.demo.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/thymeleaf")
public class ThymeleafController {
	@RequestMapping("/hello")
	public String hello(Map<String,Object> map) {
		map.put("msg", "Hello Thymeleaf");
		map.put("msg1", "Hello Thymeleaf1");
		return "cshtmlfold/hello";
	}
	@RequestMapping(value = "/postData" , method = RequestMethod.GET)
	@ResponseBody
	public  Map<String, Object> postData(Map<String,Object> map) {
		map.put("msg", "Hello Thymeleaf");
		map.put("msg1", "Hello Thymeleaf1");
		return map;
	}
}
